import React from 'react'

class PropertySettingTools extends React.Component {

  constructor(props) {
    super(props)
  }

  onDataSearch(event) {
    var input = this.refs.property_search;
    var value = $(input).val();
    this.props.onDataSearch(value)
  }

  render() {
    return (
      <div className="Property-setting-tools row">
        <div className="col-sm-4 f-dn">
          <div className="input-group">
            <input ref="property_search" type="text" className="form-control" placeholder="Search for..." />
            <span className="input-group-btn">
              <button className="btn btn-default" type="button"
                      onClick={(event)=>this.onDataSearch(event)}>Go!</button>
            </span>
          </div>
        </div>
        <div className="col-sm-1 col-lg-1 col-sm-offset-10 col-lg-offset-10  create-button">
          <button type="button" className="btn-create"
                  onClick={(event)=>this.props.onSyncClick()}>同步</button>
        </div>
        <div className="col-sm-1 col-lg-1 create-button">
          <button type="button" className="btn-create"
                  onClick={(event)=>this.props.onCreateClick()}>添加</button>
        </div>


      </div>
    )
  }

}

export default PropertySettingTools
